const fs = require('fs');
const zlib = require('zlib');

const gzip = zlib.createGzip();

// const readstream = fs.createReadStream('./node.txt');
// const writestream = fs.createWriteStream('./node.zip');
// readstream
//     .pipe(writestream);

// readstream
//     .pipe(gzip)
//     .pipe(writestream)

fs.createReadStream('./node.zip')
    .pipe(zlib.createGunzip())
    .pipe(fs.createWriteStream('./node-zip.txt'))
